// src/routes.jsx
import React from 'react';
import { Routes, Route } from 'react-router-dom';
import AuthRedirect from './components/AuthRedirect';
import Home from './components/Home';
import Dashboard from './components/Dashboard';
import About from './components/About';
import Login from './components/Login';
import NotFound from './components/NotFound';

function AppRoutes() {
    return (
        <Routes>
            {/*<Route path="/" element={<Home />} />*/}
            <Route path="/login" element={<Login />} />
            <Route path="*" element={<NotFound />} />
            <Route path="/" element={
                <AuthRedirect>
                    <Dashboard />
                </AuthRedirect>}
            />
            <Route path="/dashboard" element={
                <AuthRedirect>
                    <Dashboard />
                </AuthRedirect>}
            />
        </Routes>
    );
}

export default AppRoutes;
